<?php $this->load->view('common/dpc-head');?>
<?php $this->load->view('common/dpc-header');?>
<h1 id="store-title" class="text-center" style="color:#F45435;text-shadow:2px 2px 2px #51245F;font-weight:400;"><?php echo $storeDetailsArray[0]['store_name']; ?> Promo Codes</h1>
<?php $this->load->view('common/dpc-top-search');?>
<div role="main">
	<div class="browse-a-z">
                <h2>Browse Stores By Alphabet</h2>
                <ul>
                        <li><a href="/all-promo-codes/0-9">0-9</a></li>
                                    <?php for($a=65;$a<=90;$a++){ ?>
                                        <li><a href="/all-promo-codes/<?php echo chr($a);?>"><?php echo chr($a);?></a></li>
                                        <?php }?>
                </ul>
                <div style="clear:both;"></div>
            </div>
            <div style="clear:both;"></div>            
            
              <section class="company-box">
                <div class="row">
                  <div class="column">
                    <div class="wrapper-3 tertiary">
                      <div class="row collapse">
                        <div class="large-8 columns" style="float:left;">
                          <div class="splitter-right">
                            <div class="inner">
                              <div class="row collapse">
                                <div id="store-image" class="large-4 columns">
                                  <figure>
                                    <img src="<?php echo $storeDetailsArray[0]['store_image']; ?>" alt="" style="box-shadow:0px 0px 4px #A049BB;border-radius:3px;"><h2><a target="_blank" rel="nofollow" href="<?php echo $storeDetailsArray[0]['store_affilateurl']; ?>">Visit <?php echo $storeDetailsArray[0]['store_name']; ?> </a></h2>
                                  </figure>
                                </div>
                                <div class="large-8 columns">
                                  <div class="space-left">
                                    <h2 id="store-name" class="alt"><?php echo $storeDetailsArray[0]['store_name']; ?></h2>
                                    <div id="desc1" class="text-content store-content-less" align="justify">
                                      <?php echo substr($storeDetailsArray[0]['store_description'], 0, 350); ?> ...
                                      &nbsp;&nbsp;<a href="javascript:void(0);" onclick="showDesc(0)" style="margin:0px 0 0 337px;">Envale</a>
                                    </div>
                                    <div id="desc" class="text-content store-content-full" align="justify" style="display:none;">
                                      <?php echo $storeDetailsArray[0]['store_description']; ?>
                                      <a href="javascript:void(0);" onclick="showDesc(1)" style="margin:-22px 0 0 322px;padding:0;position:absolute;">Conceal</a>
                                    </div>
                                    <a class="input button blue secondary responsive fixed" href="javascript:void(0);"
                                     onmouseout="document.getElementById('DDMenu1').style.display = 'none';"
			                 		 onmouseover="findPosX(this, 'DDMenu1');findPosY(this, 'DDMenu1');document.getElementById('DDMenu1').style.display = 'block';" style="background-color:#51245F;">Follow</a>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                        
                        <div id="DDMenu1" style="width: 391px; position: absolute; z-index: 7000; display: none;"
         				onmouseout="document.getElementById('DDMenu1').style.display = 'none';document.getElementById('artistName').className = 'lft_nav_txt1';"
         				onmouseover="document.getElementById('DDMenu1').style.display = 'block';document.getElementById('artistName').className = 'lft_nav_txt1';">
         					<form id="newsletter-form" class="sign-up">
							    <h2 id="newsletter-title" class="sign-up-title">Subscribe</h2>
							    <input type="text" class="sign-up-input" id="name-input" name="name-input" placeholder="What's your Name?" autofocus>
							    <input type="text" class="sign-up-input" id="email-input" name="email-input" placeholder="Enter Your Email ID">
							    <input type="submit" value="Subscribe.!" class="sign-up-button" id="subscribe-button">
							    <input type="submit" value="Subscribed.!" class="sucess-button" id="subscribe-button1" style="display:none;">
							</form>
           			 	</div>
                        
                        <div class="large-4 columns" style="float:right;">
                          <div class="splitter-left">
                            <div class="inner dark-bg">
                              <div class="row">
                                <div class="large-6 columns text-center">
                                  <h3 id="coupon-count" style="float:left;">Total Coupons : </h3><p class="value primary" style="float:left;margin:7px 0 0 10px;"><?php echo count($storeCouponsArray); ?></p>
                                  <p style="clear:both;"></p>
                                </div>
                              </div>
                            </div>
                            <div class="inner">
                              <div id="ratingWidget">
                              <?php $this->load->view('common/star-rating');?>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div style="clear:both;"></div>
                      </div>
                    </div>
                  </div>
                </div>
              </section>
            
              <div class="row">                
                
                <div class="large-9 columns">
                                    
                  <div class="coupons-wrapper">
                    <div class="row">
                      <div class="large-8 columns">
                        <h2><?php echo $storeDetailsArray[0]['store_name']; ?> Promo Codes <span>- <?php echo $count=count($storeCouponsArray); ?> result<?php if($count>1){ ?>s<?php } ?></span></h2>
                      </div>
                      <!-- <div class="large-4 columns">
                        <div class="ui-links sort-items">
                          <a href="company.html#">Popular</a> | <a href="company.html#" class="current">Newest</a>
                        </div>
                      </div>-->
                    </div>
                    
                    <ul class="rr items-landscape">
                    <?php foreach($storeCouponsArray as $temp){ ?>
                      <li class="wrapper-3">
                        <div class="row">
                          <div class="large-4 small-12 columns">
                            <figure id="coupon-image"><a href="/coupon.php/<?php echo $temp['coupon_id']; ?>/<?php echo $temp['store_id']; ?>" target="_blank" rel="nofollow">
                              <img src="
										<?php if(isset($temp['coupon_image']) && $temp['coupon_image']!=''){ echo $temp['coupon_image'];}
										else { echo $temp['store_image'];}?>
										" alt="<?php echo $temp['store_name'];?> promo code" style="box-shadow:0px 0px 2px #A049BB;border-radius:3px;border:0;">
								<?php if($temp['coupon_type']=='FeaturedCpn'){?>
									<img src="/public/images/featured2.png" style="position:absolute;left:13px;border-radius:3px;" />
								<?php }?>
								</a>
                            </figure><h6 style="margin-top:5px;">Shared On: <?php echo date("dS-F-Y", strtotime($temp['coupon_startdate'])); ?></h6>
                          </div>
                          <div class="large-5 small-8 columns">
                            <div class="col-middle">
                              <h2 class="alt"><a href="/coupon.php/<?php echo $temp['coupon_id']; ?>/<?php echo $temp['store_id']; ?>" target="_blank" rel="nofollow"><?php echo $temp['coupon_name']; ?></a></h2>
                              <p id="coupon-description" class="text secondary">
                                <?php echo $temp['coupon_description']; ?>
                              </p>
                            </div>
                          </div>
                          <div class="large-3 small-4 columns">
                            <div class="col-right">
                              <p id="coupon-off" class="value secondary"><?php if($temp['coupon_off_in']=='Percentage'){ echo $temp['coupon_off_by'].' %';}else{ echo 'Rs '.$temp['coupon_off_by'];}?> <?php if($temp['coupon_offer_only']=='Yes'){ echo 'offer';}else{ echo 'off';}?></p>
                              <h6><?php echo $temp['diff'];?> days left</h6>
                              <?php if($temp['coupon_code']!=''){?>
                              <a href="javascript:void(0);" rel="nofollow" class="input button red secondary responsive" id="showCoupon<?php echo $temp['coupon_id']; ?>" onclick="showCouponCode('<?php echo $temp['coupon_id']; ?>','<?php echo $temp['store_id']; ?>')">Show Coupon</a>
                              <span class="input button border secondary responsive" id="couponCode<?php echo $temp['coupon_id']; ?>" style="display:none;"><?php echo $temp['coupon_code'];?></span>
                              <?php } else{?>
                              <a href="/coupon.php/<?php echo $temp['coupon_id']; ?>/<?php echo $temp['store_id']; ?>" target="_blank" rel="nofollow" class="input button blue secondary responsive">Learn more</a>
                              <?php }?>
                            </div>
                            <?php if($temp['coupon_code']!=''){?>
                            <div class="fb-like" style="margin-left:20px;margin-top:5px;" data-href="https://www.facebook.com/pages/Discountpromocodesin/724716974212508" data-width="The pixel width of the plugin" data-height="The pixel height of the plugin" data-colorscheme="light" data-layout="button_count" data-action="like" data-show-faces="false" data-send="true"></div>
                            <?php } ?>
                          </div>
                        </div>
                      </li>
                      <?php } ?>
                    </ul>
                  </div>
                  
                  <div id="expired-coupons" class="coupons-wrapper">
                    <div class="row">
                      <div class="large-8 columns">
                        <h2 id="share-with-us">Please share your experience with us !</h2>
                      </div>
                    </div>
                    <ul id="expCpn" class="wrapper-3">
                    <div class="fb-comments" data-href="https://www.facebook.com/pages/Discountpromocodesin/724716974212508" data-numposts="50" data-width="700"></div>
                    </ul>
                    <div style="clear:both;">&nbsp</div>
                    <div class="row">
                      <div class="large-8 columns">
                        <h2 id="expired-coupon-title"><?php echo $storeDetailsArray[0]['store_name']; ?> Expired Discount Coupons</h2>
                      </div>
                    </div>
                    <ul id="expCpn">
                    <?php foreach($expiredStoreCouponsArray as $temp){ ?>
                      <li>
                        <h2 class="alt">Expired: <a href="/coupon.php/<?php echo $temp['coupon_id']; ?>/<?php echo $temp['store_id']; ?>"  target="_blank" rel="nofollow"><?php echo $temp['coupon_name']; ?> - [ <?php echo $temp['coupon_code']; ?> ]</a></h2>
                      </li>
                      <?php } ?>
                      
                    </ul>
                  </div>
                  
                </div>
                
                <aside class="large-3 columns main-sidebar">
                  <?php if(isset($bannersArray) && !empty($bannersArray)){?>
                  <div id="banner" class="video-box small" style="margin:5px 0 0 0;">
                    <a href="<?php echo $bannersArray[0]['banner_link'];?>" target="_blank" rel="nofollow"><img src="<?php echo $bannersArray[0]['banner_image'];?>" alt="<?php echo $bannersArray[0]['banner_alt'];?>" border="0" style="border-radius:5px;" /></a>
                  </div>
                  <?php }?>
                  <div class="testimonials-box flexslider" style="margin:0;">
                    <ul class="rr">
                      <li>
                        <div class="testimonial">
                          <div class="wrapper-5" id="catTag">
                          	<h3>Related Categories</h3>
                          	<ul id="related-categories">
                          	<?php foreach($relatedCat as $other){?>
                          		<li>
                          			<a href="/<?php echo $other['parent_url'].'/'.$other['category_url'];?>"><?php echo $other['category_name'];?></a>
                          		</li>
                          	<?php }?>
                          	<div style="clear: both;"></div>
                          	</ul>
                          </div>
                        </div>
                      </li>
                    </ul>
                  </div>
					<div style="background-color:#fff;border-radius:5px;border:1px solid rgba(0, 0, 0, 0.15);margin-top:15px;" class="fb-like-box" data-href="https://www.facebook.com/pages/Discountpromocodesin/724716974212508" data-width="234" data-height="400" data-show-faces="true" data-header="false" data-stream="false" data-show-border="false"></div>
                  	<div style="clear:both;"></div>                  
                  <div class="testimonials-box flexslider">
                    <ul class="rr">
                      <li>
                        <div class="testimonial">
                          <div class="wrapper-5" id="catTag">
                          	<h3>Related Stores</h3>
                          	<ul id="related-stores">
                          	<?php foreach($relatedStore as $other){?>
                          		<li>
                          			<a href="/<?php echo $other['store_url'];?>-promo-codes"><?php echo $other['store_name'];?></a>
                          		</li>
                          	<?php }?>
                          		<li>
                          			<a href="/all-promo-codes">Browse All Stores</a>
                          		</li>
                          	<div style="clear: both;"></div>
                          	</ul>
                          </div>
                        </div>
                      </li>
                    </ul>
                  </div>
                  
                  <div id="customer-reviews" class="testimonials-box flexslider">
                    <ul class="rr slides">
                    <?php foreach($reviewsArray as $temp){?>
                      <li>
                        <div class="testimonial">
                          <div class="wrapper-5 bubble">
                            <p class="text small rr">
                              <?php echo $temp['reviews_content'];?>
                            </p>
                          </div>
                          <h5 class="alt text-right"><?php echo $temp['reviews_by'];?></h5>
                        </div>
                      </li>
                     <?php }?>
                    </ul>
                  </div>
                
                </aside>
              </div>
            </div>
            
          </div>
<?php $this->load->view('common/dpc-footer');?>
